﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MedCenters.aspx.cs" Inherits="MedCenters" 
MasterPageFile="~/Admin/MasterPage.master" EnableEventValidation="false" %>

<asp:Content ID="Content1" runat="Server" ContentPlaceHolderID="MainContent">
<h1>Медицинские цетнры</h1><br />
<div class="RegularBold">Page keywords</div>
<asp:TextBox runat="server" ID="txtKeywords"  Width="500px"></asp:TextBox>
<br />
    <div class="RegularBold">
        Page description</div>
    <asp:TextBox runat="server" ID="txtDescription" Width="500px"></asp:TextBox>
    <div class="RegularBold">
        Browser title</div>
    <asp:TextBox runat="server" ID="txtBrowserTitle" Width="500px"></asp:TextBox>
    <br />
<asp:Button ID="btnAddKeywords" runat="server" Text="Сохранить" OnClick="btnAddKeywords_Click"></asp:Button>
<br />
<img src="images/Delimiter.png" border="0" alt=""><br />
<h2>Центры</h2>
<asp:GridView ID="gvCenters" runat="server" AutoGenerateColumns="false" CssClass="SiteStats"
        AllowPaging="false" AlternatingRowStyle-CssClass="SiteStatsA" RowStyle-CssClass="SiteStats"
        Width="98%" AllowSorting="false" OnRowDataBound="gvCenters_RowBound">
        <Columns>
            <asp:BoundField DataField="cTitle" HeaderText="Категория" HeaderStyle-CssClass="StatsHeader" />
                
            <asp:TemplateField HeaderText="Действие" HeaderStyle-CssClass="StatsHeader" ItemStyle-VerticalAlign="Top">
            <ItemTemplate>
                <asp:ImageButton runat="server" ToolTip="Click to move this row up" ImageUrl="Images/MoveUp.png"
                    ID="btnUp" OnCommand="gvCenters_ItemCommand" CausesValidation="false" CommandName="MoveUp" CommandArgument='<%# Eval("ID") %>'/>
                <asp:ImageButton runat="server" ToolTip="Click to move this row down" ImageUrl="Images/MoveDown.png" CommandName="MoveDown"
                    ID="btnDown" OnCommand="gvCenters_ItemCommand" CommandArgument='<%# Eval("ID") %>'/>
                <asp:Button OnCommand="btnDeleteCenter_Click" CausesValidation="false" UseSubmitBehavior="false" CommandArgument='<%# Eval("ID") %>'
                    Text='удалить' ID="btnDeleteCenter" CssClass="but" runat="server"  />
                <asp:Button OnCommand="btnEditCenter_Click" UseSubmitBehavior="false" CommandArgument='<%# Eval("ID") %>'
                    Text="редактировать" runat="server" ID="btnEditCenters" CssClass="but" />
            </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    
    <div class="RegularBold">Добавить категорию раздела:</div>
    <asp:HiddenField runat="server" ID="hfCatID" />
    <asp:TextBox runat="server" ID="txtAddCategory"  Width="500px"></asp:TextBox><br />
    <div class="RegularBold">keywords категории:</div>
    <asp:TextBox runat="server" ID="txtCatKeywords"  Width="500px"></asp:TextBox><br />
    <div class="RegularBold">description категории:</div>
    <asp:TextBox runat="server" ID="txtcatDescription"  Width="500px"></asp:TextBox><br />
    <asp:Button runat="server" ID="btnAddCategory" Text="Send" OnClick="btnAddCategory_Click" />
    <br />
     <img src="images/Delimiter.png" border="0" alt="">
    <h2>Статьи</h2>
 <asp:GridView ID="gvNews" runat="server" AutoGenerateColumns="false" CssClass="SiteStats"
        AllowPaging="true" AlternatingRowStyle-CssClass="SiteStatsA" RowStyle-CssClass="SiteStats"
        Width="98%" AllowSorting="true" OnSorting="gvNews_Sorting" OnRowDataBound="gvNews_RowBound"
         PagerSettings-Visible="true"  PageSize="40" >
        <Columns>
            <asp:BoundField DataField="PublishDate" SortExpression="Date" HeaderText="Дата" HeaderStyle-CssClass="StatsHeader"/>
            <asp:BoundField DataField="cTitle" HeaderText="Категория" HeaderStyle-CssClass="StatsHeader"/>
            <asp:BoundField DataField="Title" HeaderText="Статья" SortExpression="Title" HeaderStyle-CssClass="StatsHeader"/>
            <asp:TemplateField HeaderText="Показывать на сайте" HeaderStyle-CssClass="StatsHeader">
                <ItemTemplate>
                <asp:CheckBox runat="server" ID="chkVisible" CommandArgument='<%# Eval("ArticleID") %>' AutoPostBack="true" OnCheckedChanged="chkVisible_Changed" Checked='<%# Eval("Isvisible") %>' />
                </ItemTemplate>
                </asp:TemplateField>
            <asp:BoundField DataField="Views" HeaderText="Просмотров" SortExpression="Views" HeaderStyle-CssClass="StatsHeader"/>
            <asp:TemplateField HeaderText="Действие" HeaderStyle-CssClass="StatsHeader">
            <ItemTemplate>
               <asp:Button OnCommand="btnDeleteNews_Click" CausesValidation="false" UseSubmitBehavior="false" CommandArgument='<%# Eval("ArticleID") %>'
                    Text='удалить' ID="btnDeleteNews" CssClass="but" runat="server"  />
              <asp:Button OnCommand="btnEditNews_Click" UseSubmitBehavior="false" CommandArgument='<%# Eval("ArticleID") %>'
                    Text="редактировать" runat="server" ID="btnEditNews" CssClass="but" />
            </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
</asp:Content>
